package lt.marsrutai.mobile.android.model;

import lt.marsrutai.mobile.android.model.enums.TransportType;
import android.os.Parcel;
import android.os.Parcelable;

public class Schedule implements Parcelable {
    
    private String id;
    private String name;
    private String trackName;
    private TransportType transportType;
    private String transportId;
    private String validComment;
    
    public Schedule() {
    }
    
    private Schedule(Parcel in) {
        id = in.readString();
        name = in.readString();
        trackName = in.readString();
        transportType = TransportType.parseEnum(in.readString());
        transportId = in.readString();
        validComment = in.readString();
    }

    public static final Parcelable.Creator<Schedule> CREATOR = new Parcelable.Creator<Schedule>() {

        @Override
        public Schedule createFromParcel(Parcel in) {
            return new Schedule(in);
        }

        @Override
        public Schedule[] newArray(int size) {
            return new Schedule[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(name);
        dest.writeString(trackName);
        dest.writeString(transportType.toString());
        dest.writeString(transportId);
        dest.writeString(validComment);
    }
    
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTrackName() {
        return trackName;
    }

    public void setTrackName(String trackName) {
        this.trackName = trackName;
    }

    public TransportType getTransportType() {
        return transportType;
    }

    public void setTransportType(TransportType transportType) {
        this.transportType = transportType;
    }

    public String getTransportId() {
        return transportId;
    }

    public void setTransportId(String transport) {
        this.transportId = transport;
    }

    public String getValidComment() {
        return validComment;
    }

    public void setValidComment(String validComment) {
        this.validComment = validComment;
    }

}
